package work.lianwei;

/**
 * @author Gong.Yang
 * 中文匹配测试
 */
public class ChineseTest {
    private static boolean validChinese(String valid) {
        String chineseRegex = ".*[\u4E00-\u9FA5|\\！|\\，|\\。|\\（|\\）|\\《|\\》|\\“|\\”|\\？|\\：|\\；|\\【|\\】].*";
        return valid.matches(chineseRegex);
    }

    public static void main(String[] args) {
        System.out.println(validChinese("xx 省"));
        System.out.println(validChinese("xx province"));
    }
}
